home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
wildcat
/
qwkhold1.zip
/
LOGON2.WCC
< prev
next >
Wrap
Text File
|
1996-05-17
|
25KB
|
566 lines
'LOGON2.WCC by James Mardis (FidoNet 1:322/746) 5/7/96
'
'This program notifies callers that they have PreScanned QWK mail waiting
'for pickup when the call in and allows them to download it. The compiled
'version can be named either LOGON1.WCX or LOGON2.WCX but LOGON2.WCX is the
'preferred title as it will allow users the oprion of reading messages that
'may have come in after the QWK bundle was made, if they so choose.
'It is used with it's companion programs QWK2MAKE.WCC and QWK2HOLD.WCC.
'
'You may Freely modify this program as long as you do NOT charge for
'it's use in this form or the modified form. This program is in the
'public domain. This program carries no Warranty, Guarantee whatsover.
'You use this program at your own risk. The original Author shall NOT
'be held responsible for any damages whatsoever as to the result or use
'of this program. After all, It is in the public Domain and is subject
'to change without the knowledge of the Author (James Mardis).
'
'
'The configuration file, QWK2HOLD.CFG breaks down as follows:
'Line #1, Complete PathName where WCMAIL QWK stores mail packets,
' such as C:\WILDCAT\MAIL\QWK\
'
'Line #2, File area number for QWK Mail that was choosen in the Makewild
' QWK Mail area.
'
'Line #3, Complete PathName where QWK2 can store all user mail packets.
'
'Line #4, Valid values are COMMENT(1) thru COMMENT(5) exactly as shown.
' The right and left parentheses around the number are
' manditory.
'
' The actual value found in the user's COMMENT(?) field will
' contain either QWK2 ON XX or QWK2 OFF XX where XX equals
' the number of mail packets that are currently in storage.
' The XX field must begin at character 10 in the comment field.
'
'Line #5, Security Profile #1 to exclude from operating this program.
' I use this to bar NEWUSER from this program
' while allowing them access to other WCX programs.
' If not used set it to NO SEC1.
'
'Line #6, Security Profile #2 to exclude from operating this program.
' If not used set it at NO SEC2.
'
'Line #7 Maximum number of QWK packets a caller can have waiting for pickup.
' Valid values are 1 to 26.
'
'Line #8 Maximum number of days to keep stored QWK packets.
' Valid values are 1 to 365.
'
'Line #9 Maximum allowed storage space for user packets in bytes, but
' a minimum of 1 packet is allowed regardless of this value.
' Valid values are 1 to 2147483647, this is in bytes like
' what you see when listing a DOS directory from DOS.
'
'Line #10 Conference number where user messages are to be sent.
' Messages will be sent with the Private flag turned on.
'
'Line #11 Prompt colors normal for Text and Background, leave off @ symbols.
' Default two character code is 0E.
'
'Line #12 Prompt colors normal for Highlighted Text.
' Default two character code is 0B.
'
'Line #13 Prompt colors normal for Packet size and elsewhere.
' Default two character code is 0C.
'
'Line #14 Prompt colors normal for warning messages.
' Default two character code is 0E.
'
'Line #15 Path to inbound mail flag, Where to find QWK2MA?.FLG.
'
'Line #16 Text to display when Mail Flag #1 is found.
'
'Line #17 Text to display when Mail Flag #2 is found.
'
'Line #18 Text to display when Mail Flag #3 is found.
'
'Line #19 Text to display when Mail Flag #4 is found.
'
'Line #20 Text to display when Mail Flag #5 is found.
'
dim BadEnd as Integer 'Value to trigger program failure message.
dim ChaStr1 as String 'Junk String Variable, re-used at will.
dim ChaStr2 as String 'Junk String Variable, re-used at will.
dim CurCode as Date 'Current Date while in ddmmyyyy format.
dim CurDate as Integer 'Current date coded in DOS format.
dim CurDay as String 'Current Day while code is run.
dim CurMonth as String 'Current Month while code is run.
dim CurYear as String 'Current Year while code is run.
dim FileDos as Word 'File date in DOS code format.
dim FileNm2 as String 'Used to Open assorted files.
dim FileSearch as SearchRec 'Search record array for file info.
dim FileSize as Long 'Current file size.
dim FindQWK as Integer '"For" loop counter vailable.
dim FindUser as Integer '"For" loop counter variable.
dim MaxAge as Integer 'QWK2HOLD.CFG #8, Maximum # of days packets kept.
dim MaxPacket as Integer 'QWK2HOLD.CFG #7, Maximum allowed QWK packets.
dim MaxSize as Long 'QWK2HOLD.CFG #9, Maximum size of all packets.
dim MaxUser as Integer 'Total number of users in userlist.
dim MsgHd as MessageHeader 'Used to send messages.
dim MsgPlace as Integer 'QWK2HOLD.CFG #10, Conference where messages go.
dim NewFile as String 'New QWK file name.
dim NumInt1 as Integer 'Junk Integer Variable, re-used at will.
dim NumInt2 as Integer 'Junk Integer Variable, re-used at will.
dim OldAge as Integer 'Oldest number of packet days in existance.
dim OldFile as String 'Old QWK file name.
dim P1 as String 'QWK.CFG #11, Prompt #1 Color.
dim P2 as String 'QWK.CFG #12, Prompt #2 Color.
dim P3 as String 'QWK.CFG #13, Prompt #3 Color.
dim P4 as String 'QWK.CFG #14, Prompt #4 Color.
dim MailProc1 as String 'QWK.CFG #16, Prompt for mail flag #1
dim MailProc2 as String 'QWK.CFG #17, Prompt for mail flag #2
dim MailProc3 as String 'QWK.CFG #18, Prompt for mail flag #3
dim MailProc4 as String 'QWK.CFG #19, Prompt for mail flag #4
dim MailProc5 as String 'QWK.CFG #20, Prompt for mail flag #5
dim QWKAge as Integer 'Current age of the packet in days.
dim QWKFlag as String 'QWK2HOLD.CFG #4, QWK search variable.
dim QWKInbound as String 'QWK2HOLD.CFG #15, Path to mail flag.
dim QWKLocal as String 'Path where Sysop's local QWK packets wind up.
dim QWKRoute as String 'QWK2HOLD.CFG #3, Path to QWK2 mail packets.
dim QWKTotal as Integer 'Total number of QWK packets for user.
dim QWKLeft as Integer 'Total number of QWK packets a user has left.
dim QWKSysop as String 'Path choosen by Sysop for local transfer.
dim SecPro1 as String 'QWK2HOLD.CFG #5, Security Profile #1 restriction.
dim SecPro2 as String 'QWK2HOLD.CFG #6, Security Profile #2 restriction.
dim Size as Long 'Place to store total size of stored packets.
dim UKey as String 'Used to determine user's choice.
dim WCMailRoute as String 'QWK2HOLD.CFG #1, Path where WCMAIL stores packets.
dim WCMailZip as Integer 'QWK2HOLD.CFG #2, File area number used in WCMAIL.
dim QWKDown as String 'Used to determine if user wants to download QWK.
'
ChaStr2 = "QWK2: Logon program was started."
ActivityLog ChaStr2
'Start main program here, after the variables
EnablePages Off ' Disable inbound page till program ends, resets at end.
FileNm2 = ProgPath + "QWK2HOLD.CFG" 'QWK2HOLD.CFG is the configuration file.
If Exists (FileNm2) then 'If QWK2HOLD.CFG exists, get data.
OPEN FileNm2 for Input as #1 'Open CFG file for reading.
If Not(local) Then CarrierCheck Off 'Ignore modem till entire file read.
LockFile (1,0,1) 'Temporary file lock for multinode use.
Input #1, WCMailRoute '#1, Path where WCMAIL stores packets.
Input #1, WCMailZip '#2, File directory # from MAKEWILD(WCMAIL).
Input #1, QWKRoute '#3, Path to QWK Mail Packets.
Input #1, QWKFlag '#4, User QWK Comment(?) action.
Input #1, SecPro1 '#5, Security Exclusion Value #1.
Input #1, SecPro2 '#6, Security Exclusion Value #2.
Input #1, MaxPacket '#7, Maximum number of user QWK Packets.
Input #1, MaxAge '#8, Maximum # of days to keep stored packets.
Input #1, MaxSize '#9, Maximum size of storage for user packets.
Input #1, MsgPlace '#10, Conference number where messages are to go.
Input #1, P1 '#11, Prompt color for normal text.
Input #1, P2 '#12, Prompt color for highlighted text.
Input #1, P3 '#13, Prompt color for Packet size.
Input #1, P4 '#14, Prompt color for Alert Messages.
Input #1, QWKInbound '#15, Path to inbound mail flag, if mail processing.
Input #1, MailProc1 '#16, Mail Processing message #1.
Input #1, MailProc2 '#17, Mail Processing message #2.
Input #1, MailProc3 '#18, Mail Processing message #3.
Input #1, MailProc4 '#19, Mail Processing message #4.
Input #1, MailProc5 '#20, Mail Processing message #5.
UnlockFile (1,0,1) 'Remove temporary file lock.
Close #1 'Close the CFG file.
If Not(Local) Then CarrierCheck On 'File read, exit if carrier dropped.
Else 'Go here if no CFG file is found.
BadEnd = 0 'Set up error message.
Goto Problem 'No CFG file was found, abort the program.
End If 'End of LOGIN2.CFG input.
If (User.SecLevel = SecPro1) or (User.SecLevel = SecPro2) Then
BadEnd = 23: Goto Problem
End If
'Validate read QWK2HOLD.CFG file data.
If WCMailRoute = "" Then
BadEnd = 1: Goto Problem 'WCMail Path missing, QWK2HOLD.CFG LINE #1.
Else 'WCMailroute actually contains something.
WCMailRoute = Trim(UCase(WCMailRoute)) 'Make it Uppercase & Trim spaces.
If Mid(WCMailRoute,2,2) <> ":\" Then BadEnd = 1: Goto Problem
If Right(WCMailRoute,1) <> "\" Then 'Verify path ends in a backslash.
WCMailRoute = WCMailRoute + "\" 'Slash was added.
End If 'End of WCMailRoute slash check.
End If 'End of WCMailRoute check.
If QWKRoute = "" Then
BadEnd = 2: Goto Problem 'QWKRoute missing, QWK2HOLD.CFG LINE #2.
Else 'QWKRoute actually contains something.
QWKRoute = Trim(UCase(QWKRoute)) 'Make it Uppercase & Trim spaces.
IF Mid(QWKRoute,2,2) <> ":\" Then BadEnd = 2: Goto Problem
IF Right(QWKRoute,1) <> "\" Then 'Verify path ends in backslash.
QWKRoute = QWKRoute + "\" 'Slash was added.
End If 'End of QWKRoute slash check.
End If 'End of QWKRoute check.
If QWKFlag = "" Then 'Does QWKFlag value exist in the CFG file.
BadEnd = 3: Goto Problem 'QWKFlag missing, QWK2HOLD.CFG Line #3.
Else 'QWKFlag actually contains something.
QWKFlag = UCase(QWKFlag) 'Make it Uppercase.
End If' End of If QWKFlag.
If SecPro1 = "" Then
SecPro1 = "NO SEC1" 'If no QWK2HOLD.CFG Line #5, set value.
Else 'SecPro1 actually contains something.
SecPro1 = Trim(UCase(SecPro1)) 'Make it Uppercase & Trim spaces.
End If
If SecPro2 = "" Then
SecPro2 = "NO SEC2" 'If no QWK2HOLD.CFG Line #6, set value.
Else 'SecPro2 actually contains something.
SecPro2 = Trim(UCase(SecPro2)) 'Make it Uppercase & Trim spaces.
End If
If QWKInbound = "" Then
BadEnd = 15: Goto Problem 'QWKInbound missing, QWK2HOLD.CFG LINE #15.
Else 'QWKInbound actually contains something.
QWKInbound = Trim(UCase(QWKInbound)) 'Make it Uppercase & Trim spaces.
IF Mid(QWKInbound,2,2) <> ":\" Then BadEnd = 15: Goto Problem
IF Right(QWKInbound,1) <> "\" Then 'Verify path ends in backslash.
QWKInbound = QWKInbound + "\" 'Slash was added.
End If 'End of QWKInbound slash check.
End If
If MaxPacket <= 0 Then MaxPacket = 1 'Minimum value is 1.
If MaxPacket >= 26 Then MaxPacket = 26 'Had to set a limit somewhere.
If MaxAge <= 0 Then MaxAge = 0 'Keep the old packets forever.
If MaxAge >= 365 Then MaxAge = 365 'Maximum life of packets is 1 year.
If MaxSize <= 0 Then MaxSize = 2147483647 'If zero, set limit at highest.
If MaxSize >= 2147483647 Then MaxSize = 2147483647 'Set maximum size limit.
If P1 = "" or Len(P1) <> 2 Then 'Check prompt P1, normal text.
P1 = "@0E@" 'Set default prompt.
Else P1 = "@" + UCase(P1) + "@"
End If
If P2 = "" or Len(P2) <> 2 Then 'Check prompt P2, highlighted text.
P2 = "@0F@" 'Set default prompt.
Else P2 = "@" + UCase(P2) + "@"
End If
If P3 = "" or Len(P3) <> 2 Then 'Check prompt P3, Packet sizes.
P3 = "@0B@" 'Set default prompt.
Else P3 = "@" + UCase(P3) + "@"
End If
If P4 = "" or Len(P4) <> 2 Then 'Check prompt P4, alert text.
P4 = "@0C@" 'Set default prompt.
Else P4 = "@" + UCase(P4) + "@"
End If
CurrentDate(CurCode) 'Put date into CurDate.
ChaStr1 = FormatDate(CurCode,"ddmmyyyy") 'Convert data into usable String.
CurDay = Left(ChaStr1,2) 'Current Day established, used for CurDate.
CurMonth = Mid(ChaStr1,3,2) 'Current Month established, used for CurDate.
CurYear = Mid(ChaStr1,5,4) 'Current Year established, used for CurDate.
'Following line codes Wildcat! date to DOS style date for comparisons.
CurDate = ((Val(CurYear)-1980)*512) + (Val(CurMonth)*32)+Val(CurDay)
If WCMailRoute = QWKRoute Then
ChaStr2 = "QWK2: Line #1 and Line #3 of QWK2HOLD.CFG MUST NOT be the same."
ActivityLog ChaStr2
Goto Finished
End If
'>>>----> End of Configuration file and variable setup.
'Clean up loop, in case caller lost carrier during downloading.
NumInt1 = 0
FindQWK = 0
Do While FindQWK < MaxPacket
NewFile = QWKRoute + Str(User.UserID) + ".QW" + Chr(NumInt1 + 65)
OldFile = QWKRoute + Str(User.UserID) + ".QW" + Chr(FindQWK + 65)
If Exists(OldFile) Then 'OldFile already exists so go add one and go on.
FindQWK = FindQWK + 1
NumInt1 = NumInt1 + 1
If OldFile <> NewFile Then 'OldFile exists but does it match Newfile
Name OldFile as NewFile' Nope, rename Oldfile to fill gap.
End If 'End of If Oldfile <> Newfile
ELSE 'Oldfile was not found, increment and go thru loop again.
FindQWK = FindQWK + 1
End If 'End of If Exists(Oldfile)
Loop
'End of Clean up loop
QWKTotal = NumInt1
NumInt1 = 0 'Will turn into non-zero if flag is raised.
NewFile = QWKRoute + Str(User.UserID) + ".QWA"
OldFile = WCMailRoute + Str(User.UserID) + ".QWK"
If Exists(QWKInbound + "QWK2MA1.FLG") Then
NumInt1 = 1
If MailProc1 <> "" Then
Print P4;MailProc1
Else
Print P4;"Mail Flag #1 is currently flying high."
End If 'End of message1.
End If 'End of flag1.
If Exists(QWKInbound + "QWK2MA2.FLG") Then
NumInt1 = 1
If MailProc2 <> "" Then
Print P4;MailProc2
Else
Print P4;"Mail Flag #2 is currently flying high."
End If 'End of message2.
End If 'End of flag2.
If Exists(QWKInbound + "QWK2MA3.FLG") Then
NumInt1 = 1
If MailProc3 <> "" Then
Print P4;MailProc3
Else
Print P4;"Mail Flag #3 is currently flying high."
End If 'End of message3.
End If 'End of flag3.
If Exists(QWKInbound + "QWK2MA4.FLG") Then
NumInt1 = 1
If MailProc4 <> "" Then
Print P4;MailProc4
Else
Print P4;"Mail Flag #4 is currently flying high."
End If 'End of message4.
End If 'End of flag4.
If Exists(QWKInbound + "QWK2MA5.FLG") Then
NumInt1 = 1
If MailProc5 <> "" Then
Print P4;MailProc5
Else
Print P4;"Mail Flag #5 is currently flying high."
End If 'End of message5.
End If 'End of flag5.
Print
If Trim(Left(User.Comment(Val(Mid(QWKFlag,9,1))),8)) = "QWK2 ON" Then
If NumInt1 = 1 Then
Print P3;"If you are still ""Online"" when your QWK Packet(s) are due to be made"
Print P3;"then yours will be skipped till the next time mail is processed."
Print
Delay 3
End If
ELSE
If NumInt1 = 1 Then
Delay 3
End If
End If
If Exists(NewFile) or Exists(OldFile) Then
FindQWK = 0
Print P1;"At least one QWK mail packet is on hold, looking for others."
Print
Print P1;" FileName Size in Kbytes Age";P2
NewFile = QWKRoute + Str(User.UserID) + ".QW" + Chr(FindQWK + 65)
OldFile = QWKRoute + Str(User.UserID) + ".QW" + Chr(NumInt1 + 65)
FindQWK = 0
Do While FindQWK < MaxPacket
Newfile = QWKRoute + Str(User.UserID) + ".QW" + Chr(FindQWK + 65)
If Exists(NewFile) Then 'Checking for existing stored packet.
FindFirst(NewFile,0,FileSearch)
FileSize=FileSearch.Size
FileDos=FileSearch.DosDate
Size = Size + FileSearch.Size
Print P2;LeftPad(UCase(Trim(MakeWild.PacketID)) + ".QW" + Chr(FindQWK + 65),8);
Print P3;LeftPad(Str(Int(FileSearch.Size/100)),11);
Print P2;LeftPad(Str(CurDate - FileDos),10);
If CurDate - FileDos = 1 Then
Print P1;" Day"
Else
If CurDate - FileDos = 0 Then
Print P1;" Today"
Else
Print P1;" Days"
End If 'End If age = 0
End If 'End of If age = 1
Else 'Ran out of files to check in QWK2.
Exit Do 'Early escape out of the Do While loop.
End If 'Done checking for existing packet.
FindQWK = FindQWK + 1
Loop' Run thru the Do While loop again.
'Look for orphaned QWK packets the user may have made with WCMAIL.
ChaStr1 = QWKRoute + Str(User.UserID)'Partial Newfile.
If QWKTotal >= 26 then 'If number of packets already at limit.
NumInt1 = 48' Make packet end in zero.
Else 'Go look for more packets.
NumInt1 = QWKTotal + 1'Otherwise make it next letter in alphabet.
End If 'Done determining new packets for NewFile construction.
NewFile = ChaStr1 + ".QW" + Chr(NumInt1) 'Newfile variable.
OldFile = WCMailRoute + Str(User.UserID) + ".QWK" 'OldFile Variable.
If Exists(OldFile) Then 'Get ready to relocate WCMAIL QWK Packet.
CopyFile(OldFile,NewFile) 'Copy WCMAIL QWK packet to storage.
ChaStr1 = Str(User.UserID) + ".QWK"
DeleteFile(ChaStr1,WCMailZip,1) 'Delete old QWK file from disk & records.
QWKTotal = QWKTotal + 1'Increment total number of stored packets.
FindFirst(NewFile,0,FileSearch) 'Establish FileSearch variable.
FileSize=FileSearch.Size'Determine packet file size.
Size = Size + FileSearch.Size 'Increment size of stored packets.
Print LeftPad(FileSearch.Name,12) + LeftPad(Str(Int(FileSearch.Size/100)),14)
End If 'WcMail packet has been moved to storage.
ELSE
NumInt2 = Val(Mid(QWKFlag,9,1)) 'Which Comment(?) is in use.
If Trim(Left(User.Comment(NumInt2),8)) <> "QWK2 ON" Then Goto Finished
Print P4;"There are no QWK mail packets on hold for you at this time."
Print
Delay 3
Goto Finished
End If 'Finished loading variables and displaying any existing packets.
Print P1;"You have ";P2;QWKTotal;P1;" mail packet";
If QWKTotal > 1 Then Print "s";
Print " for a total of ";P3;Int(Size/100);P1;" Kbytes."
If QWKTotal >= 1 Then
Print P1;"Do you want to download";
If QWKTotal > 1 Then
Print" all packets";
Else
Print" the packet";
End If 'If QWKTotal > 1
Print" now or just the first one?"
Print
Print P2;"The following choices are available for your use:"
Print P1;"[";P2;"A";P1;"]ll packets downloaded now and continue."
Print P1;"[";P2;"D";P1;"]ownload all packets now and log off of the BBS."
Print P1;"[";P2;"F";P1;"]irst, download only first packet and continue."
Print P1;"[";P2;"N";P1;"]o packets downloaded at this time, continue with BBS."
Print
ChaStr2 = InputMask(P1+"Choose ["+P2+"A"+P1+"]ll, ["+P2+"D"+P1+"]ownload & Goodbye, ["+P2+"F"+P1+"]irst, or ["+P2+"N"+P1+"]one ","X","A")
ChaStr2 = UCase(ChaStr2)
UKey = ChaStr2 'Set Ukey value from user's input.
If Chastr2 = "N" Then Print: Goto Finished'Abort out of here.
If ChaStr2 = "A" Then'Going for the whole hog.
If QWKTotal > 1 Then
Print P1;"The mail packets will be sent in sequence, one right after the other."
Print P3;"There will be a short pause between packets, please be patient."
End If 'End of If QWKTotal.
End If 'End checking for All Response.
End If 'End of If QWKTotal > 1
If (Local) Then
Print
Print P1;"Enter the path where you want your mail packets to wind up."
Print P1;"Please use the following format shown in example: ";P2;"C:\QWK\";UCase(Trim(MakeWild.PacketId));P1;"."
QWKSysop = InputMask("-->","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")'Get local Sysop mail path.
If QWKSysop = "" Then
BadEnd = 21: Goto Problem 'Bad response from Sysop.
End If'If QWKSysop = ""
QWKSysop = Trim(UCase(QWKSysop)) 'Make it Uppercase & trim spaces.
IF Mid(QWKSysop,2,2) <> ":\" Then BadEnd = 21: Goto Problem
IF Right(QWKSysop,1) = "\" Then 'Verify no ending backslash.
NumInt1 = Len(QWKSysop) - 1
QWKSysop = Left(QWKSysop,NumInt1) 'Slash was removed
End If 'End of QWKSysop slash check.
End If 'End of If (Local)
Print
If UKey <> "A" Then
ChaStr2 = InputMask(P1+"Hit the Enter key to begin the file transfer or ["+P2+"A"+P1+"] to abort.","X")
If UCase(Left(ChaStr2,1)) = "A" then UKey = "": Goto Finished
End If' If UKey <> "A"
QWKLeft = QWKTotal 'Load in how many packets a user needs to download.
For FindQWK = 0 to QWKTotal - 1
OldFile = QWKRoute + Str(User.UserID) + ".QW" + Chr(FindQWK + 65)
ChaStr2 = TempPath
NewFile = ChaStr2 + UCase(Trim(MakeWild.PacketID)) + ".QW" + Chr(FindQWK + 65)
If (Local) then
If Len(QWKSysop) <= 20 Then PushCommand QWKSysop 'PushCommand 20 char limit.
End If
CopyFile (OldFile,NewFile)' Move to temp. Can't use Name -> drive letter.
Del OldFile
If SendFile(NewFile) Then 'Goto else option if not a good send.
ChaStr2 = UCase(Trim(MakeWild.PacketID)) + ".QW" + Chr(FindQWK + 65)
ActivityLog "QWK2: File " + ChaStr2 + " was downloaded successfully."
Del NewFile 'Delete file that was sucessfully sent.
QWKLeft = QWKLeft - 1
Else
Print P4;" Mail transfer failed.";P1
CopyFile (NewFile,OldFile)' Rename and put file back in storage.
Del NewFile
ChaStr2 = UCase(Trim(MakeWild.PacketID)) + ".QW" + Chr(FindQWK + 65)
ActivityLog "QWK2: " + ChaStr2 + " was not downloaded successfully."
Exit For
End If
If Ukey = "F" Then
Print
ChaStr2 =InputMask(P1+"["+P2+"N"+P1+"]ext File, ["+P2+"S"+P1+"]top Downloading ","X","N")
If UCase(Left(ChaStr2,1)) = "S" Then
Exit For 'Early out of For loop.
End If 'Done looking for S.
End If 'End of If "F"
Next FindQWK
'Final Clean up
If Not(QWKLeft = QWKTotal) Then 'At least one mail packet was transferred.
NumInt1 = QWKTotal - QWKLeft' Determine how many are left in storage.
QWKTotal = QWKLeft 'Correct total value now as something was downloaded.
For FindQWK = 0 to QWKLeft - 1
NewFile = Trim(QWKRoute) + Str(User.UserID) + ".QW" + Chr(FindQWK + 65)
OldFile = Trim(QWKRoute) + Str(User.UserID) + ".QW" + Chr(NumInt1 + 65)
Name OldFile As NewFile'Move names of left over packets to top.
NumInt1 = NumInt1 + 1
Next FindQWK
End If
Goto Finished ' End Program.
'>>>----> Start of Problem Goto
Problem: 'Come here if there is a drop dead error needing sysop attention.
'Note: (Problem:) is used as a Gosub or a Goto depending or BadEnd #.
'Reserve BadEnd 1 - 20 for .CFG file checking
If BadEnd >= 0 and BadEnd <=19 Then 'Something wrong with configuation file.
CLS
Print
If BadEnd = 0 Then
Print P4;"The QWK2HOLD.CFG file was not located." 'Where is it.
Else
Print P1;"Line [";P2;BadEnd;P1;"] of the ";P2;"QWK2HOLD.CFG";P1;" has a problem." 'What line is bad.
End If 'End If BadEnd = 0
Print
Print P1;"The current values of your ";P2;"QWK2HOLD.CFG";P1;" file are";P2;":"
Print P1;"Line #1 = [";P2;WCMailRoute;P1;"]"
Print P1;"Line #2 = [";P2;WCMailZip;P1;"]"
Print P1;"Line #3 = [";P2;QWKRoute;P1;"]"
Print P1;"Line #4 = [";P2;QWKFlag;P1;"]"
Print P1;"Line #5 = [";P2;SecPro1;P1;"]"
Print P1;"Line #6 = [";P2;SecPro2;P1;"]"
Print P1;"Line #7 = [";P2;MaxPacket;P1;"]"
Print P1;"Line #8 = [";P2;MaxAge;P1;"]"
Print P1;"Line #9 = [";P2;MaxSize;P1;"]"
Print P1;"Line #10 = [";P2;MsgPlace;P1;"]"
Print P1;"Line #11 = [";P2;Mid(P1,2,2);P1;"]"
Print P1;"Line #12 = [";P2;Mid(P2,2,2);P1;"]"
Print P1;"Line #13 = [";P2;Mid(P3,2,2);P1;"]"
Print P1;"Line #14 = [";P2;Mid(P4,2,2);P1;"]"
Print P1;"Line #15 = [";P2;QWKInbound;P1;"]"
Print
Print P1;"Waiting for ";P2;"60";P1" seconds before ending program."
Delay 60
ChaStr2 = "QWK2: Your QWK2HOLD.CFG has a problem with line #"+Str(BadEnd)+"."
ActivityLog ChaStr2
Goto Finished
End If 'End Error #1 - 19.
If BadEnd = 20 Then
Print
Print P1;"Your input did not make sense, you may not download your QWK"
Print P1;"packet at this time."
Print
ChaStr2 = "QWK2: User's input was confusing, program aborted."
ActivityLog ChaStr2
Goto Finished
End If
If BadEnd = 21 Then
Print
Print P1;"The path you supplied could not be located. Mail packet"
Print P1;"transfer did not take place at this time."
Print
ChaStr2 = "QWK2: User's supplied path was not located, program aborted"
ActivityLog ChaStr2
Goto Finished
End If
If BadEnd = 22 Then
ChaStr2 = "QWK2: User does not have QWK checking turned on."
ActivityLog ChaStr2
Goto Finished
End If
If BadEnd = 23 Then
ChaStr2 = "QWK2: User did not meet security requirements for QWK2."
ActivityLog ChaStr2
Goto Finished
End If
'>>>----> End of Problem Goto
'>>>----> Come here when finished with the program
Finished:
ChaStr2 = "QWK2: Logon program has ended."
ActivityLog ChaStr2
If UKey = "D" Then 'Then Quit BBS
Goodbye True 'Log off user
End If 'End of Ukey = "D"
End